<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    System.out.println("来自jsp"+path);
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
    System.out.println(basePath);
//    这一步没做导致下面${}读不到
    request.setAttribute("basePath",basePath);
%>

<html>
<head>
    <title>Login</title>
</head>
<body>

<form action="${basePath}/login" method="post">
    <input type="text" name="username" id="username" placeholder="请输入用户名">
    <input type="password" name="password" id="password" placeholder="请输入密码">
    <input type="checkbox" name="login">
    <input type="submit" width="100" value="登录">
</form>
</body>
</html>
